package com.bw.system.config;

import com.alipay.easysdk.kernel.Config;
import lombok.Data;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author：尚志豪
 * @Package：com.bw.system.config
 * @Project：ruoyiszh
 * @name：AliPayConfig
 * @Date：2024/12/31 9:58
 */

@Configuration
@Data
public class AliPayConfig {


    @Bean
    public Config alipayConfig(){
        Config config = new Config();
        config.protocol = "https";
        config.gatewayHost = "openapi-sandbox.dl.alipaydev.com";
        config.signType = "RSA2";
        config.appId = "2021000143605310";
        // 为避免私钥随源码泄露，推荐从文件中读取私钥字符串而不是写入源码中
        config.merchantPrivateKey = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCOYqq/oUxYSNR5fAv5waMAJ7L5BiCknK8a/gluknkLFP68Ep+PVouWmK/92QIzOGjb9fgkKrqkEZ3aw6R+k3UxoUM9hUWTu5IhUJ1Ls68RE/b58BbtOIOiM6ClwxWYa/sIsyVABd8U5wQ1UbTP7jjMj1imyxSLxpSHbSURFG7KYprHmt7Kzd2yZDGvkuWsHUGALMbY+p0QgLEjCiW/jjg4Y6t39XwZ8llhnkObE2f4k6LY9OCF5z6Y0KjZFyFbyP6hO/pEMolb8OgDPYucllb/K4iawjAYAj8u0lyWr3MUwqQR5uB00eqzz7tTGQcS7wvpDYl5sN9MikMkw0U7AZY1AgMBAAECggEBAIpwFGRNh9UuuqeDnIExbDJyZukItCRY00gDR1hiwZ2sxCBIWysako3R1wuROzph1lJHTQSdJuru1fQl1IHdDU075gyiz4tcDDCoGMfJ5KVOLAvHDAOJtzK1z7RbgVu5YVKMG+Or0cKY+tZ8oriofkEl/qPtQATHBxLFZAy/ORk8YsF0M1z1q1DUQw/XJZfxUJ+g7SMn5uT9q6eI2XVfTX84cDTbMbdlNhXA58skXLrxY2a1aEJnfauPPGKIk+fdt/GoKu/KW54/rFalqDk/N0gMSoQKR3mfLPRmiQwi8PQHhjlmd5LAtJJOjRjNVYVTrA9hLWN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4psHVUx7FJ0fejWD+4HthTnG/foP6C3/3GVUzQ8IgZAgtK5+q2hXuBRU/F51e4lj2WaSkIpAqALQpoq6aa3cWrCgWCiC6le6KosEAUS1ILfAdg0FbGhf4j8MAc7Kppnqi9Uff22OxifVjq446lj5Qa0JwxscWboIRIXNz1ig4uhLC/qfzFmip/928PT9IUCgiXRo5QuHJaO1rnVzolAXvQwIDAQAB";

        //可设置异步通知接收服务地址（可选）
        config.notifyUrl = "https://zrvwgi.natappfree.cc/notify";
        return config;
    }
}
